//package cn.momoshenchi.config;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.security.authentication.AuthenticationManager;
//import org.springframework.security.config.annotation.authentication.configuration.EnableGlobalAuthentication;
//import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
//import org.springframework.security.crypto.password.PasswordEncoder;
//import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
//import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
//import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
//import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
//import org.springframework.security.oauth2.provider.token.TokenStore;
//import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
//
///**
// * @version : 1.0
// * @author: momoshenchi
// * @date: 2021/5/14 - 10:41
// */
////@Configuration
////@EnableAuthorizationServer
//@EnableGlobalMethodSecurity(prePostEnabled=true)
//public class AuthorServerConfig extends AuthorizationServerConfigurerAdapter
//{
////    @Autowired
////    private PasswordEncoder passwordEncoder;
////
////    @Autowired
////    private JwtAccessTokenConverter jwtAccessTokenConverter;
////    @Autowired
////    private TokenStore tokenStore;
////
////    @Autowired
////    private AuthenticationManager authenticationManager;
//
////    @Override
////    public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception
////    {
////        endpoints.authenticationManager(authenticationManager)
////        .tokenStore(tokenStore)
////        .accessTokenConverter(jwtAccessTokenConverter);
////        }
//
////    @Override
////    public void configure(ClientDetailsServiceConfigurer clients) throws Exception
////    {
////        clients.inMemory()
////            .withClient("student")
////            .secret(passwordEncoder.encode("123456"))
////            .accessTokenValiditySeconds(3600)
////            .scopes("all")
////            .authorizedGrantTypes("password");
////    }
//}
